﻿using System;
using System.Runtime.Serialization;
using System.Linq;
using Invoicing.Model.Products;

namespace Invoicing.Model.Orders
{
    [DataContract]
    public class DealOrderDetailModel : MBase
    {
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public int ID { get; set; }
        [Model]
        [DataMember]
        public int OID { get; set; }
        [Model]
        [DataMember]
        public int ProductID { get; set; }
        [Model]
        [DataMember]
        public int MaterialID { get; set; }
        [Model]
        [DataMember]
        public int ProcessID { get; set; }
        [Model]
        [DataMember]
        public string Size { get; set; }
        [Model]
        [DataMember]
        public decimal Quantity { get; set; }
        [Model]
        [DataMember]
        public decimal UnitPrice { get; set; }
        [Model]
        [DataMember]
        public decimal WeightQuantity { get; set; }
        [Model]
        [DataMember]
        public decimal WeightUnitPrice { get; set; }
        [Model]
        [DataMember]
        public decimal Money { get; set; }

        #region Help
        [DataMember]
        public ProductModel Product { get; set; }
        [DataMember]
        public ProductMaterialModel Material { get; set; }
        [DataMember]
        public ProductProcessModel Process { get; set; }
        [DataMember]
        public string MaterialName { get; set; }
        [DataMember]
        public string ProcessName { get; set; }
        #endregion

    }

    [DataContract]
    public class DealOrderDetailCollection : ModelCollectionBase<DealOrderDetailModel> { }
}
